package com.yingsheng.bi.hks.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
@ApiModel
public class User {

    @ApiModelProperty(value = "用户名")
    private String name;

    @Max(value = 100)
    @Min(value = 1)
    private int age;

    @ApiModelProperty(value = "用户手机号", required = true, allowableValues = "^1[0-9]{10}$")
    @NotBlank
    @Pattern(regexp = "^[1][3,4,5,7,8][0-9]{9}$", message = "手机号码格式不正确")
    private String mobile;

    @ApiModelProperty(value = "证件类型")
    private String identTp;

    @ApiModelProperty(value = "证件号")
    private String identNo;

    @ApiModelProperty(value = "家庭住址")
    private String address;

    @ApiModelProperty(value = "邮箱")
    private String email;

}
